#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
-------------------------------------------------
   文件名（File Name）：     YOU GET FILTER2.6.1
   开源许可证书（License） :  Mulan PSL v1
   作者（Author） :             林之松
   日期（date）：          2019/10/30
-------------------------------------------------
   Change Activity:
                             2019/11/12:
-------------------------------------------------
Copyright (c) [2019] [林之松]
[You Get Filtered2.6.1] is licensed under the Mulan PSL v1.
You can use this software according to the terms and conditions of the Mulan PSL v1.
You may obtain a copy of Mulan PSL v1 
at:http://license.coscl.org.cn/MulanPSL

THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
PURPOSE.

See the Mulan PSL v1 for more details.

____________________________________________________
"""

from time import sleep, time

import os
 
import glob

import array

import gc

import math

try:

  def mem(way=1):

    print ()

    for i in range(10000000):

        if way == 1:
            pass
        else:  
            del i
            
    print ()

    if way == 1 or way == 2:
        pass
    else:  

        gc.collect()

    print () 

  
  #加压特定元素

  defensehacker1=['a','b','c','seg000','E9','CA','loc','FE','jmp','mov','bp','offset','stru','F5']

  defensehacker2=['1','2','0628','635','@','$','/','*','!','%','#','+','-']

  defensehacker6=['_','<','>','?','|','^','(',')','&','~','`']

  defensehacker7=['0x80045704','x50','0xff','x4D','0xffff','x56','x4F','0xDE','x5A','x4C']

  hacker3=zip(defensehacker1,defensehacker2,defensehacker6,defensehacker7)

  for  i in hacker3:

    print(i)

  for i in range(10,0,-1):

    print(i)

  string =array.array('i',[-1,-2,-3])

  print(string)

  string.byteswap()

  print(string)

  print(string.buffer_info())

  #利用python在终端打开网页链接

  webpage = raw_input("输入：")

  print(webpage)
  
  #利用glob模块定位需要清理垃圾的模糊路径
  
  File_1= glob.glob (r"C:\Users\Local\Temp\NVIDIA Corporation\NV_Cache\*.*")
        

  for NV_Cache in File_1:

                 if File_1 != 0:
                        try:
                                os.remove(NV_Cache)
                                print (r'deleting NVIDIA Corporation\NV_Cache')
                        except OSError:
                                print (r'NVIDIA Corporation\NV_Cache cant be removed')

  File_2= glob.glob (r"file:///home/pi/Filter/index.html/*.*")
        

  for FireFox_Cache in File_2:

                 if File_2 != 0:
                        try:
                                os.remove(FireFox_Cache)
                                print (r'deleting HTML\FireFox_Cache')
                        except OSError:
                                print (r'HTML\NV_Cache cant be removed')

finally:

      print (r'结束')
      
      url = raw_input("再输入一次：")
      
      print(url)
      
      sleep(20)


